<?php
$v = $data['svalue'];
?><!doctype html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/public/diy/editor.css" />
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/validate.js?v=1.0"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/ajaxForm.js?v=1.0"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/admin/js/common.js?newversion"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/diy/diy_edit.js"></script>
    <!--upload-->
    <link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.css">
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.js"></script>
    <script type="text/javascript">
        upload_image_2("<?php echo site_url('admin/upload/ajax_upload');?>",'filePicker','title_logo','logo_box', '<?php echo URLPIC?>');
        var rowtypedata = [[
            [1, '&nbsp;'],
            [2, '<input style="width:80px;" placeholder="目的地" class="input" name="title[]" /> <input style="width:100px" placeholder="链接地址" class="input" name="link[]" value=""> <input style="width:450px" placeholder="多个攻略ID用空格或逗号隔开" class="input" name="trip_ids[]" /> <a class="del" onclick="deleterow(this)"></a>'],
        ]];
    </script>
</head>
<body>
<div class="wrap">
    <div class="table_full">
        <div class="h_a"><p>类型：可切换攻略列表 </p></div>
        <form method="post" class="formvalidate" action="<?php echo $form_url;?>" onsubmit="return false">
            <table class="list tab_label" cellpadding="0" cellspacing="1" border="0" id="general_config">
                <tbody>
                <tr>
                    <th style="width:100px">标题</th>
                    <td colspan="2">
                        <input type="text" class="input rounded" name="e[title]" value="<?php echo $v['e']['title'];?>" style="width:400px" />
                        <p class="g">输入标题后保存，即可看到效果，如：周边游</p>
                    </td>
                </tr>
                <tr>
                    <th style="width:100px">攻略列表</th>
                    <td colspan="2">
                        <input style="width:80px;" placeholder="目的地" class="input" name="title[]" value="<?php echo $v['title'][0]?>" />
                        <input style="width:100px" placeholder="链接地址" class="input" name="link[]" value="<?php echo $v['link'][0]?>">
                        <input style="width:450px" placeholder="多个攻略ID用空格或逗号隔开" class="input" name="trip_ids[]" value="<?php echo $v['trip_ids'][0]?>" />
                    </td>
                </tr>
                <?php
                foreach ((array)$v['title'] as $k => $vv) {
                    if($k ==0){
                        continue;
                    }
                ?>
                    <tr>
                        <th>&nbsp;</th>
                        <td colspan="2">
                            <input style="width:80px;" placeholder="目的地" class="input" name="title[]" value="<?php echo $v['title'][$k]?>" />
                            <input style="width:100px" placeholder="链接地址" class="input" name="link[]" value="<?php echo $v['link'][$k]?>">
                            <input style="width:450px" placeholder="多个攻略ID用空格或逗号隔开" class="input" name="trip_ids[]" value="<?php echo $v['trip_ids'][$k]?>" /><a class="del" onclick="deleterow(this)"></a>
                        </td>
                    </tr>
                <?php }?>
                <tr>
                    <th>&nbsp;</th>
                    <td colspan="2">
                        <a class="btn_submit" href="javascript:void(0);" onclick="addrow(this,0);">增加</a>
                        <p class="ored">目的地填写行政区划名如：海南、云南、欧洲；多个攻略ID用空格或逗号隔开。也可以填写个性的词语，如精选</p>
                        <p class="ored">链接地址填：目的地拼音；如hainan，yunnan，ouzohu</p>
                    </td>
                </tr>
                <tr>
                    <th>栏目图标</th>
                    <td style="vertical-align: middle;">
                        <input type="hidden" id="title_logo" name="title_logo" value="<?php echo $v['title_logo']?>" />
                        <span id="filePicker">上传</span>
                        <img class="view_pic" id="logo_box" data-uri="<?php echo $v['title_logo'] ? $v['title_logo'] : ''?>" src="<?php echo $v['title_logo'] ? $v['title_logo'] : ''?>">
                        <span style="display:inline-block;height:20px;"></span>
                    </td>
                    <td>
                        <span class="g">
                            <b class="ored">推荐尺寸200*30</b> 无法上传请等待加载完毕或重新打开页面；请使用<a class="ored" href="http://cloud.66diqiu.com/download/chrome.rar" target="_blank">Chrome浏览器</a>进行上传</span>
                    </td>
                </tr>
                <tr>
                    <th>更多(可不填)</th>
                    <td colspan="2">
                        <p>链接名称：<input class="input rounded valid" type="text" name="e[name]" value="<?php echo $v['e']['name']?>" /> <span class="g">如：更多>></span></p>
                        <p>链接地址：<input class="input rounded w350" type="text" name="e[link]" value="<?php echo $v['e']['link']?>" /></p>
                        <p class="g">如：国内游：guoneiyou，周边游：zhoubianyou，出境游：chujingyou, 自助游：zizhu</p>
                        <div class="g">
                            链接地址如何获取？
                            在导航上或分类中鼠标移动到链接上，右击复制链接地址，然后将地址粘贴到这里。
                            <p class="ored">填写相对链接即可，如果链接中带域名，需要把域名删除。如：把<?php echo site_url();?>删除</p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>&nbsp;</th>
                    <td colspan="2">
                        <button type="submit" class="btn_submit">保存</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>
</body>
</html>